Integrand size = 22, antiderivative size = 154 \[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=-\frac {3 d x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {3 c \text {arctanh}(\cos (a+b x))}{2 b}-\frac {d \text {arctanh}(\sin (a+b x))}{b^2}-\frac {d \csc (a+b x)}{2 b^2}+\frac {3 i d \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {3 i d \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.13, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {2702, 294, 327, 213, 4505, 6406, 12, 4268, 2317, 2438, 3855, 2701} \[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=-\frac {d \text {arctanh}(\sin (a+b x))}{b^2}-\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 d x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 d x \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 i d \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {3 i d \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}-\frac {d \csc (a+b x)}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b} \]
[In]
[Out]
Rule 12
Rule 213
Rule 294
Rule 327
Rule 2317
Rule 2438
Rule 2701
Rule 2702
Rule 3855
Rule 4268
Rule 4505
Rule 6406
Rubi steps \begin{align*} \text {integral}& = -\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b}-d \int \left (-\frac {3 \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 \sec (a+b x)}{2 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{2 b}\right ) \, dx \\ & = -\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b}+\frac {d \int \csc ^2(a+b x) \sec (a+b x) \, dx}{2 b}+\frac {(3 d) \int \text {arctanh}(\cos (a+b x)) \, dx}{2 b}-\frac {(3 d) \int \sec (a+b x) \, dx}{2 b} \\ & = \frac {3 d x \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 d \text {arctanh}(\sin (a+b x))}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b}-\frac {d \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\csc (a+b x)\right )}{2 b^2}+\frac {(3 d) \int b x \csc (a+b x) \, dx}{2 b} \\ & = \frac {3 d x \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 d \text {arctanh}(\sin (a+b x))}{2 b^2}-\frac {d \csc (a+b x)}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b}+\frac {1}{2} (3 d) \int x \csc (a+b x) \, dx-\frac {d \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (a+b x)\right )}{2 b^2} \\ & = -\frac {3 d x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 d x \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}-\frac {d \text {arctanh}(\sin (a+b x))}{b^2}-\frac {d \csc (a+b x)}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b}-\frac {(3 d) \int \log \left (1-e^{i (a+b x)}\right ) \, dx}{2 b}+\frac {(3 d) \int \log \left (1+e^{i (a+b x)}\right ) \, dx}{2 b} \\ & = -\frac {3 d x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 d x \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}-\frac {d \text {arctanh}(\sin (a+b x))}{b^2}-\frac {d \csc (a+b x)}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b}+\frac {(3 i d) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2}-\frac {(3 i d) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2} \\ & = -\frac {3 d x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 d x \text {arctanh}(\cos (a+b x))}{2 b}-\frac {3 (c+d x) \text {arctanh}(\cos (a+b x))}{2 b}-\frac {d \text {arctanh}(\sin (a+b x))}{b^2}-\frac {d \csc (a+b x)}{2 b^2}+\frac {3 i d \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {3 i d \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}+\frac {3 (c+d x) \sec (a+b x)}{2 b}-\frac {(c+d x) \csc ^2(a+b x) \sec (a+b x)}{2 b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(520\) vs. \(2(154)=308\).
Time = 6.16 (sec) , antiderivative size = 520, normalized size of antiderivative = 3.38 \[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\frac {d x}{b}-\frac {d \cot \left (\frac {1}{2} (a+b x)\right )}{4 b^2}-\frac {c \csc ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}-\frac {d x \csc ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}-\frac {3 c \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{2 b}+\frac {d \log \left (\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )\right )}{b^2}+\frac {3 c \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{2 b}-\frac {d \log \left (\cos \left (\frac {1}{2} (a+b x)\right )+\sin \left (\frac {1}{2} (a+b x)\right )\right )}{b^2}-\frac {3 a d \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )}{2 b^2}+\frac {3 d \left ((a+b x) \left (\log \left (1-e^{i (a+b x)}\right )-\log \left (1+e^{i (a+b x)}\right )\right )+i \left (\operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-\operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )\right )\right )}{2 b^2}+\frac {c \sec ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}+\frac {d x \sec ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}+\frac {c \sin \left (\frac {1}{2} (a+b x)\right )}{b \left (\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )\right )}-\frac {c \sin \left (\frac {1}{2} (a+b x)\right )}{b \left (\cos \left (\frac {1}{2} (a+b x)\right )+\sin \left (\frac {1}{2} (a+b x)\right )\right )}+\frac {d \left (a \sin \left (\frac {1}{2} (a+b x)\right )-(a+b x) \sin \left (\frac {1}{2} (a+b x)\right )\right )}{b^2 \left (\cos \left (\frac {1}{2} (a+b x)\right )+\sin \left (\frac {1}{2} (a+b x)\right )\right )}+\frac {d \left (-a \sin \left (\frac {1}{2} (a+b x)\right )+(a+b x) \sin \left (\frac {1}{2} (a+b x)\right )\right )}{b^2 \left (\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )\right )}-\frac {d \tan \left (\frac {1}{2} (a+b x)\right )}{4 b^2} \]
[In]
[Out]
Time = 1.43 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.73
method | result | size |
risch | \(\frac {3 d x b \,{\mathrm e}^{5 i \left (x b +a \right )}+3 c b \,{\mathrm e}^{5 i \left (x b +a \right )}-2 d x b \,{\mathrm e}^{3 i \left (x b +a \right )}-2 c b \,{\mathrm e}^{3 i \left (x b +a \right )}-i d \,{\mathrm e}^{5 i \left (x b +a \right )}+3 d x b \,{\mathrm e}^{i \left (x b +a \right )}+3 c b \,{\mathrm e}^{i \left (x b +a \right )}+i d \,{\mathrm e}^{i \left (x b +a \right )}}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}-\frac {3 d \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x}{2 b}-\frac {3 c \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{2 b}+\frac {3 c \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{2 b}-\frac {3 d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{2 b^{2}}+\frac {2 i d \arctan \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {3 i d \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}\right )}{2 b^{2}}+\frac {3 i d \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{2 b^{2}}\) | \(267\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 621 vs. \(2 (130) = 260\).
Time = 0.28 (sec) , antiderivative size = 621, normalized size of antiderivative = 4.03 \[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=-\frac {4 \, b d x - 6 \, {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} - 2 \, d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 4 \, b c + 3 \, {\left (i \, d \cos \left (b x + a\right )^{3} - i \, d \cos \left (b x + a\right )\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + 3 \, {\left (-i \, d \cos \left (b x + a\right )^{3} + i \, d \cos \left (b x + a\right )\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + 3 \, {\left (i \, d \cos \left (b x + a\right )^{3} - i \, d \cos \left (b x + a\right )\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + 3 \, {\left (-i \, d \cos \left (b x + a\right )^{3} + i \, d \cos \left (b x + a\right )\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + 3 \, {\left ({\left (b d x + b c\right )} \cos \left (b x + a\right )^{3} - {\left (b d x + b c\right )} \cos \left (b x + a\right )\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + 3 \, {\left ({\left (b d x + b c\right )} \cos \left (b x + a\right )^{3} - {\left (b d x + b c\right )} \cos \left (b x + a\right )\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - 3 \, {\left ({\left (b c - a d\right )} \cos \left (b x + a\right )^{3} - {\left (b c - a d\right )} \cos \left (b x + a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) - 3 \, {\left ({\left (b c - a d\right )} \cos \left (b x + a\right )^{3} - {\left (b c - a d\right )} \cos \left (b x + a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) - 3 \, {\left ({\left (b d x + a d\right )} \cos \left (b x + a\right )^{3} - {\left (b d x + a d\right )} \cos \left (b x + a\right )\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - 3 \, {\left ({\left (b d x + a d\right )} \cos \left (b x + a\right )^{3} - {\left (b d x + a d\right )} \cos \left (b x + a\right )\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + 2 \, {\left (d \cos \left (b x + a\right )^{3} - d \cos \left (b x + a\right )\right )} \log \left (\sin \left (b x + a\right ) + 1\right ) - 2 \, {\left (d \cos \left (b x + a\right )^{3} - d \cos \left (b x + a\right )\right )} \log \left (-\sin \left (b x + a\right ) + 1\right )}{4 \, {\left (b^{2} \cos \left (b x + a\right )^{3} - b^{2} \cos \left (b x + a\right )\right )}} \]
[In]
[Out]
\[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\int \left (c + d x\right ) \csc ^{3}{\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1481 vs. \(2 (130) = 260\).
Time = 0.58 (sec) , antiderivative size = 1481, normalized size of antiderivative = 9.62 \[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\int { {\left (d x + c\right )} \csc \left (b x + a\right )^{3} \sec \left (b x + a\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x) \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\text {Hanged} \]
[In]
[Out]